import axios from "./confing"

//定义接口
//获取天气接口
export const weatherApi = () => axios.get("/api/weather/getWeather")

//登入接口
export const loginApi = (username, password) => axios.post('/api/users/login', {
        username,
        password
    })
    //获取验证码接口
export const CaptchaApi = () => axios.get('/api/users/getCaptcha')

//验证验证码
export const verifyApi = (captcha) => axios.get('/api/users/verifyCaptcha', {
        params: { captcha }
    })
    /* 获取二维码数据接口 */
export const getcodeUrlApi = () => axios.get('/api/users/getScancode')
    /* 生成二维码图片 */
export const wechatLogin = (wechatCode) => axios.get("/api/users/wechatLogin", { params: { wechatCode } })
    /* 获取日志接口 */
export const loginlogApi = (page, count) => axios.get('/api/getloginlog', {
        params: { page, count }
    })
    /* 获取权限菜单  在用户登录以后获取*/
export const getMenuListApi = () => axios.get('/api/permission/getMenuList')
    /* 获取学员信息 */
export const getstulistApi = (page = "", count = 5, classes = "") => axios.get("/api/students/getstulist", {
    params: {
        page,
        count,
        class: classes
    }
})

/* 下拉框选择班级 */
export const getclassesApi = () => axios.get("/api/students/getclasses")

/* 期望课程数据 */
export const expectDataApi = () => axios.get('/data/expect.json')

/* 折线图数据 */
export const LineDataApi = () => axios.get("/data/rate.json")

/* 任务进度数据 */
export const taskDataApi = () => axios.get("/data/tarsk.json")
    /* 增加学院信息 */
export const addStuApi = (params = {}) => axios.post("/api/students/addstu", params)
    /* 编辑学院信息 */
export const editStuApi = (params = {}) => axios.post("/api/students/updatestu", params)
    /* 删除学院信息 */
export const delStuApi = (sId) => axios.get('/api/students/delstu', {
    params: {
        sId
    }
})